<?php

    session_start();
		
   $_SESSION["edit_on"] = true;
		
		
    $html = $_REQUEST['html'];
    $article =  $_REQUEST['article'];
    
    $dir = dirname($article);
    
    chdir("../../..");
    if (! is_dir($dir)) mkdir($dir,0,true);
		
		
		$timestamp = date('Y-m-d H:i:s');
		$html .= "\n<!-- {$_SESSION["username"]} {$timestamp} -->\n";
  
    file_put_contents(stripslashes("{$article}.edit"),$html);

    echo $html;
    
    
    




?>